Sh.User.Greeting = new Class({
	initialize : function (user) {
		this.engine = user.engine;
		this.user   = user;
		this.update();
	},
	getElement : function () {
		if (!this.element) {
			this.element = this
				.engine
				.template
				.get('greeting')
				.clone();
		}
		return this.element;
	},
	update : function () {
		return this
			.set('name', this.user.name)
			.set('path', this.user.path)
			.set('sign', this.user.isRoot() ? '#' : '$');
	},
	set : function (type, value) {
		this.getElement()
			.find(type)
			.text(value);
		return this;
	},
	get : function (type) {
		return this.getElement()
			.find(type)
			.text();
	}
});
